package milktea.servlet.product;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import milktea.entity.PRODUCT;
import milktea.service.PRODUCTService;

/**
 * Servlet implementation class ProDuctSelect
 */
@WebServlet("/manage/admin_productselect")
public class ProductSelect extends HttpServlet {

    /**
     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
     */
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {


        ArrayList<PRODUCT> plist = PRODUCTService.selectAll();

        request.setAttribute("plist", plist);


        request.getRequestDispatcher("/manage/admin_product.jsp").forward(request, response);

    }


}
